/*
 * @Author: ls
 * @Date: 2021-10-14 14:00:19
 * @LastEditTime: 2021-10-14 15:35:01
 * @LastEditors: Please set LastEditors
 * @Description: 音乐管理
 * @FilePath: \Alive-master\assets\script\game\musicManager.ts
 */
const { ccclass, property } = cc._decorator;

@ccclass
export default class MusicManager extends cc.Component {
	@property({ type: cc.AudioClip, tooltip: '背景音乐' })
	bgm: cc.AudioClip | undefined = undefined;

	start() {
		this.scheduleOnce(() => {
			cc.audioEngine.playMusic(this.bgm, true);
		}, 1);
	}
}
